<?php
// +----------------------------------------------------------------------
// | @filename ArrayEmptyResourceKeySerializer.php
// +----------------------------------------------------------------------
// | @author 落花轻舞问君愁 <mwcx1990@qq.com>
// +----------------------------------------------------------------------
// | @datetime 2021-11-02 16:04:42
// +----------------------------------------------------------------------
// | @Description
// +----------------------------------------------------------------------

namespace App\Serializer;


class ArrayEmptyResourceKeySerializer extends ArraySerializer
{
    public function collection($resourceKey, array $data)
    {
        return [$resourceKey ? : $data];
    }
}
